<script setup>
import QuillRichTextEditor from "../../components/editor/QuillRichTextEditor.vue";
import {ref} from "vue";

const content = ref('');
const editorRef = ref(null);

const getContent = () => {
  content.value = editorRef.value.getContent();
};
const setContent = () => {
  editorRef.value.setContent('<p>设置内容aaaa</p>');
}
</script>

<template>
  <div>
    <el-button @click="setContent">设置内容</el-button>
    <el-button @click="getContent">获取内容</el-button>
    <quill-rich-text-editor ref="editorRef"/>
    <div v-html="content">
    </div>
  </div>
</template>

<style scoped>

</style>